Call = {};
Call.callEvent = function(module,obj,runat, arrParams, method)
{
    method = 'get';
    
    var url = Config.web + module;
    if(Config.lang)
    {
        var url = Config.web + Config.lang + '/' + module;
    }	

	if(runat == 'Server')
	{			
		//this.callEventServer(evt, obj, url, arrParams);
	}textbox
	else
	{
		this.callEventClient(obj, url, arrParams,method);
		return false;
	}	

}

Call.callEventClient = function(obj, url, arrParams, method)
{
	if(arrParams)
	{
		arrParams.runat = 'client';
	}
	else
	{
		arrParams = {};
		arrParams.runat = 'client';
	}

   var parameterPost = {};
   var parameterGet = '';

   var parameterGet =  this.processParameterGet(arrParams);

    $.getJSON(url+parameterGet,
        function(data){
            Engine.processEventCallClient(data);
      });
 }


 Call.change = function(module,obj,runat, arrParams, method)
{
    method = 'get';
    if(arrParams)
	{
        arrParams.valueid = obj.value;		
	}
	else
	{
		arrParams = {};
        arrParams.valueid = obj.value;
	}  
    var url = this.processUrl(module);

	if(runat == 'Server')
	{
		this.callEventServer(obj, url, arrParams);
	}
	else
	{
        arrParams.runat = 'client';
		this.callEventClient(obj, url, arrParams,method);
		return false;
	}
}

Call.callEventServer = function (obj, url, arrParams)
{
     var parameterGet =  this.processParameterGet(arrParams);
     window.location = url+parameterGet;
}

Call.processParameterGet = function(arrParams)
{
    var url = "";
    for(var i in arrParams)
	{
		url += '/' + i + ':' + arrParams[i];
	}    
    return url;
}


Call.processUrl = function (module)
{
    var url = Config.web + module;
    if(Config.lang)
    {
        var url = Config.web + Config.lang + '/' + module;
    }
    return url;
}
Call.processParameterPost = function (arrParams)
{
    /*   
     var model = '';
    if(arrParams.model)
      var model =  arrParams.model;

    // unshift(arrParams.model)
   
    var dados = new Array();
    for(var i in arrParams)
	{
		dados['data'][model][i] = arrParams[i];
	}
    return dados;
    */   
}


/*

function showResponse(responseText, statusText)
{
	Engine.processEventCallBackcClient(responseText);
}
*/